package com.tengju.user.infrastructure.persistence.mybatis.mapper.dealer.custom;

import com.idanchuang.support.mybatis.crypt.annotation.CryptField;
import com.tengju.user.infrastructure.persistence.mybatis.dataobject.UserAccountDO;
import com.tengju.user.infrastructure.persistence.mybatis.dataobject.UserInfoDO;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;

/**
 * @author wuziyang
 */
public interface UserAccountDOCustomMapper {

    UserAccountDO selectByUsernamAndUserType(@CryptField @Param("username") String username, @Param("originUsername") String originUsername , @Param("userType") Integer userType);

    UserAccountDO selectByUserTypeAndOutId(@Param("userType") Integer userType,@Param("outId") Long outId);

    long insert(UserAccountDO record);

    int updatePwd(UserAccountDO record);

    int updateUsername(UserAccountDO record);

    int updateLoginTime(UserAccountDO record);

    int countTotal(@Param("userType") Integer userType);

    int countNew(@Param("userType") Integer userType, @Param("from") LocalDateTime from, @Param("to") LocalDateTime to);

    void deleteByOutId(@Param("userType") Integer userType,@Param("outId") Long outId);

}
